﻿using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mall.Application
{
    public class ProductDtoOutput
    {
        /// <summary>
        /// 编号
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [StringLength(100)]
        public string Name { get; set; }

        /// <summary>
        /// 产品类别
        /// </summary>
        public int CategoryId { get; set; }

        /// <summary>
        /// 正常售价
        /// </summary>
        [Column(TypeName = "money")]
        public decimal SellPrice { get; set; }

        /// <summary>
        /// 当前折扣价
        /// </summary>
        [Column(TypeName = "money")]
        public decimal DiscountPrice { get; set; }

        /// <summary>
        /// 品牌
        /// </summary>
        [StringLength(50)]

        public string Brand { get; set; }

        /// <summary>
        /// 大小
        /// </summary>
        [StringLength(50)]

        public string Size { get; set; }

        /// <summary>
        /// 型号
        /// </summary>
        [StringLength(50)]

        public string Type { get; set; }

        /// <summary>
        /// 生产厂家
        /// </summary>
        [StringLength(500)]

        public string Factory { get; set; }

        /// <summary>
        /// 产地
        /// </summary>
        [StringLength(50)]

        public string Area { get; set; }

        /// <summary>
        /// 其他参数
        /// </summary>

        public string OtherParas { get; set; }

        /// <summary>
        /// 是否正常可用
        /// </summary>
        [StringLength(1)]
        public string CanUse { get; set; }

        /// <summary>
        /// 描述信息
        /// </summary>

        public string Description { get; set; }

        /// <summary>
        /// 商品主图片名称(不含.jpg)
        /// </summary>
        [StringLength(500)]

        public string PicUrl { get; set; }

        /// <summary>
        /// 上架时间
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime? OnSaleTime { get; set; }
        public string CategoryName { get; set; }
    }
}
